package com.ruoyi.swla2.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.swla2.mapper.GisPointMapper;
import com.ruoyi.swla2.domain.GisPoint;
import com.ruoyi.swla2.service.IGisPointService;

/**
 * GIS管网-管点Service业务层处理
 *
 * @author gdqt
 * @date 2023-11-26
 */
@Service
public class GisPointServiceImpl implements IGisPointService {
    @Autowired
    private GisPointMapper gisPointMapper;

    /**
     * 查询GIS管网-管点
     *
     * @param id GIS管网-管点主键
     * @return GIS管网-管点
     */
    @Override
    public GisPoint selectGisPointById(Long id) {
        return gisPointMapper.selectGisPointById(id);
    }

    /**
     * 查询GIS管网-管点列表
     *
     * @param gisPoint GIS管网-管点
     * @return GIS管网-管点
     */
    @Override
    public List<GisPoint> selectGisPointList(GisPoint gisPoint) {
        return gisPointMapper.selectGisPointList(gisPoint);
    }

    /**
     * 新增GIS管网-管点
     *
     * @param gisPoint GIS管网-管点
     * @return 结果
     */
    @Override
    public int insertGisPoint(GisPoint gisPoint) {
        gisPoint.setCreateTime(DateUtils.getNowDate());
        return gisPointMapper.insertGisPoint(gisPoint);
    }

    /**
     * 修改GIS管网-管点
     *
     * @param gisPoint GIS管网-管点
     * @return 结果
     */
    @Override
    public int updateGisPoint(GisPoint gisPoint) {
        gisPoint.setUpdateTime(DateUtils.getNowDate());
        return gisPointMapper.updateGisPoint(gisPoint);
    }

    /**
     * 批量删除GIS管网-管点
     *
     * @param ids 需要删除的GIS管网-管点主键
     * @return 结果
     */
    @Override
    public int deleteGisPointByIds(Long[] ids) {
        return gisPointMapper.deleteGisPointByIds(ids);
    }

    /**
     * 删除GIS管网-管点信息
     *
     * @param id GIS管网-管点主键
     * @return 结果
     */
    @Override
    public int deleteGisPointById(Long id) {
        return gisPointMapper.deleteGisPointById(id);
    }

    @Override
    public GisPoint getByGeom(String geom) {
        return gisPointMapper.getByGeom(geom);
    }

    @Override
    public int updateGisPointByExpNo(GisPoint point) {
        return gisPointMapper.updateGisPointByExpNo(point);
    }

    @Override
    public List<GisPoint> getPointTypeCount(Map<String, Object> queryMap) {
        return gisPointMapper.getPointTypeCount(queryMap);
    }

    @Override
    public List<GisPoint> getPointAlarmData(Map<String, Object> queryMap) {
        return gisPointMapper.getPointAlarmData(queryMap);
    }

    @Override
    public List<GisPoint> getPointFeatureData(Map<String, Object> queryMap) {
        return gisPointMapper.getPointFeatureData(queryMap);
    }
}
